import axios from "@/request";
import { $m } from "@/MUI";

export function login(data) {
  return axios.get("/auth/code/auth/send", {
    params: data,
  });
}
export function logout(data) {
  return axios.post("/auth/service/oauth2/logout", data);
}
export function getAuth(data) {
  return axios.get("/hr/service/menu/getStaffMenus", {
    params: data,
  });
}

export function getUserInfo() {
  return axios.get("/hr/staff/queryStaffInfo", {});
}

export function getDict(key) {
  var url = $m.paramsSplice("/system/dict/data/type", key);
  return axios.get(url);
}

export function getEntpriseList() {
  return axios.get("/hr/staff/entInfoList", {});
}

export function setCurrentEnterprise(entKey) {
  var url = $m.paramsSplice('/hr/staff/updateEntKey', entKey)
  return axios.put(url);
}


